﻿<?php
	$this->title = 'Bienvenu sur le site de la CRC';
	$this->headTitle($this->title);
	
	if($droit_user = Zend_Auth::getInstance()->getIdentity())
			{
				$droit_user = Zend_Auth::getInstance()->getIdentity()->Droits;
			}
		else
			{
				$droit_user = 0;
			}
		if($droit_user == 3)
			{
				echo "<a href='http://localhost/caisse-retraite/public/News/ajouter-news' >Ajouter une nouvelle news</a>";
			}
?>



<script type="text/javascript"> 
$(function() {
	$( "#tabs" ).tabs();
});

</script>


<div id="tabs">
	<ul>
		<li><a href="#tabs-1">Particuliers salariés</a></li>
		<li><a href="#tabs-2">Particuliers retraités</a></li>
		<li><a href="#tabs-3">Entreprises</a></li>
		<li><a href="#tabs-4">Notre groupe</a></li>
	</ul>
	<div id="tabs-1">
		<h2>Particuliers salariés</h2>
			<ul>
				<?php
					$i = 0;
					foreach($this->news_adherent_employe as $news_adherent_employe) : 
						echo "<li><a href='#tabs-1-".$i."'>".$this->escape($news_adherent_employe->Titre)."</a></li>";
						$i++;
					endforeach;
				?>
			</ul>
			<br />
		<?php
			$i = 0;
			foreach($this->news_adherent_employe as $news_adherent_employe) : 
				echo "<h3 id='tabs-1-".$i."'>&raquo;".$this->escape($news_adherent_employe->Titre)."</h3>";
				echo "<p class='news_intro'>".$this->escape($news_adherent_employe->Resume)."</p>";
				if($this->escape($news_adherent_employe->Image_lien) != null)
					{
						echo "<img src='".$this->escape($news_adherent_employe->Image_lien)."' />";
					}
				echo "<p class='news_content'>".$news_adherent_employe->Texte."</p>";
				echo "<br />
					  <br />
				      <br />";
				$i++;
			endforeach;
		?>
		
	</div>
	<div id="tabs-2">
		<h2>Particuliers retraités</h2>
		<ul>
			<?php
					$i = 0;
					foreach($this->news_adherent_retraite as $news_adherent_retraite) : 
						echo "<li><a href='#tabs-2-".$i."'>".$this->escape($news_adherent_retraite->Titre)."</a></li>";
						$i++;
					endforeach;
				?>
			</ul>
			<br />
		<?php
			$i = 0;
			foreach($this->news_adherent_retraite as $news_adherent_retraite) : 
				echo "<h3 id='tabs-2-".$i."'>&raquo;".$this->escape($news_adherent_retraite->Titre)."</h3>";
				echo "<p class='news_intro'>".$this->escape($news_adherent_retraite->Resume)."</p>";
				if($this->escape($news_adherent_retraite->Image_lien) != null)
					{
						echo "<img src='".$this->escape($news_adherent_retraite->Image_lien)."' />";
					}
				echo "<p class='news_content'>".$news_adherent_retraite->Texte."</p>";
				echo "<br />
					  <br />
				      <br />";
				$i++;
			endforeach;
		?>
	</div>
	<div id="tabs-3">
		<h2>Entreprises</h2>
		<ul>
			<?php
					$i = 0;
					foreach($this->news_entreprise as $news_entreprise) : 
						echo "<li><a href='#tabs-3-".$i."'>".$this->escape($news_entreprise->Titre)."</a></li>";
						$i++;
					endforeach;
				?>
			</ul>
			<br />
		<?php
			$i = 0;
			foreach($this->news_entreprise as $news_entreprise) : 
				echo "<h3 id='tabs-3-".$i."'>&raquo;".$this->escape($news_entreprise->Titre)."</h3>";
				echo "<p class='news_intro'>".$this->escape($news_entreprise->Resume)."</p>";
				if($this->escape($news_entreprise->Image_lien) != null)
					{
						echo "<img src='".$this->escape($news_entreprise->Image_lien)."' />";
					}
				echo "<p class='news_content'>".$news_entreprise->Texte."</p>";
				echo "<br />
					  <br />
				      <br />";
				$i++;
			endforeach;
		?>
	</div>
	<div id="tabs-4">
		<h2>Entreprises</h2>
		<ul>
			<?php
					$i = 0;
					foreach($this->news_groupe as $news_groupe) : 
						echo "<li><a href='#tabs-4-".$i."'>".$this->escape($news_groupe->Titre)."</a></li>";
						$i++;
					endforeach;
				?>
			</ul>
			<br />
		<?php
			$i = 0;
			foreach($this->news_groupe as $news_groupe) : 
				echo "<h3 id='tabs-4-".$i."'>&raquo;".$this->escape($news_groupe->Titre)."</h3>";
				echo "<p class='news_intro'>".$this->escape($news_groupe->Resume)."</p>";
				if($this->escape($news_groupe->Image_lien) != null)
					{
						echo "<img src='".$this->escape($news_groupe->Image_lien)."' />";
					}
				echo "<p class='news_content'>".$news_groupe->Texte."</p>";
				echo "<br />
					  <br />
				      <br />";
				$i++;
			endforeach;

			
		?>
	</div>
</div>

